package com.google.zxing.client.result;

import com.google.zxing.Result;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public final class EmailDoCoMoResultParser extends AbstractDoCoMoResultParser
{
  private static final Pattern ATEXT_ALPHANUMERIC = Pattern.compile("[a-zA-Z0-9@.!#$%&'*+\\-/=?^_`{|}~]+");

  static boolean isBasicallyValidEmailAddress(String paramString)
  {
    return (paramString != null) && (ATEXT_ALPHANUMERIC.matcher(paramString).matches()) && (paramString.indexOf('@') >= 0);
  }

  public EmailAddressParsedResult parse(Result paramResult)
  {
    String str = getMassagedText(paramResult);
    if (!str.startsWith("MATMSG:"));
    String[] arrayOfString;
    do
    {
      return null;
      arrayOfString = matchDoCoMoPrefixedField("TO:", str, true);
    }
    while (arrayOfString == null);
    int i = arrayOfString.length;
    for (int j = 0; ; j++)
    {
      if (j >= i)
        break label58;
      if (!isBasicallyValidEmailAddress(arrayOfString[j]))
        break;
    }
    label58: return new EmailAddressParsedResult(arrayOfString, null, null, matchSingleDoCoMoPrefixedField("SUB:", str, false), matchSingleDoCoMoPrefixedField("BODY:", str, false));
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.google.zxing.client.result.EmailDoCoMoResultParser
 * JD-Core Version:    0.6.2
 */